using System.Collections.Generic;
using System.Threading.Tasks;
using CPlatePrintSys.Domain.Models;

namespace CPlatePrintSys.Domain.Services
{
    /// <summary>
    /// 全局配置服务接口
    /// </summary>
    public interface IGlobalConfigService
    {
        /// <summary>
        /// 获取取整规则配置
        /// </summary>
        Task<RoundingRuleConfig> GetRoundingRuleConfigAsync();

        /// <summary>
        /// 更新取整规则配置
        /// </summary>
        Task UpdateRoundingRuleConfigAsync(RoundingRuleConfig config, string updatedBy);

        /// <summary>
        /// 获取图层颜色配置
        /// </summary>
        Task<LayerColorConfig> GetLayerColorConfigAsync();

        /// <summary>
        /// 更新图层颜色配置
        /// </summary>
        Task UpdateLayerColorConfigAsync(LayerColorConfig config, string updatedBy);

        /// <summary>
        /// 获取输出目录配置
        /// </summary>
        Task<OutputDirectoryConfig> GetOutputDirectoryConfigAsync();

        /// <summary>
        /// 更新输出目录配置
        /// </summary>
        Task UpdateOutputDirectoryConfigAsync(OutputDirectoryConfig config, string updatedBy);

        /// <summary>
        /// 获取接口配置
        /// </summary>
        Task<InterfaceConfig> GetInterfaceConfigAsync();

        /// <summary>
        /// 更新接口配置
        /// </summary>
        Task UpdateInterfaceConfigAsync(InterfaceConfig config, string updatedBy);

        /// <summary>
        /// 获取指定配置键的原始值
        /// </summary>
        Task<string> GetConfigValueAsync(string configKey);

        /// <summary>
        /// 更新指定配置键的值
        /// </summary>
        Task UpdateConfigValueAsync(string configKey, string configValue, string updatedBy);

        /// <summary>
        /// 获取所有配置
        /// </summary>
        Task<List<GlobalConfig>> GetAllConfigsAsync();

        /// <summary>
        /// 检查配置是否存在
        /// </summary>
        Task<bool> ConfigExistsAsync(string configKey);

        /// <summary>
        /// 获取指定阶段的取整规则
        /// </summary>
        Task<string> GetRoundingRuleForStageAsync(string stage);

        /// <summary>
        /// 获取输出目录路径
        /// </summary>
        Task<string> GetOutputDirectoryPathAsync();

        /// <summary>
        /// 获取CadWin共享目录路径
        /// </summary>
        Task<string> GetCadWinSharePathAsync();

        /// <summary>
        /// 获取KMACS接口地址
        /// </summary>
        Task<string> GetKmacsApiUrlAsync();
    }
} 